package at.cookieforensics;
import java.util.ArrayList;
import java.util.logging.Level;

import com.gargoylesoftware.htmlunit.util.Cookie;


/**
 * This class represents Google Chrome in a somehow functional way
 * 
 * @author Martin Grottenthaler
 *
 */
public class Chrome extends SQLiteRead {
	/**
	 * list of chrome cookies
	 */
	private ArrayList<Cookie> cookies;
	/**
	 * instance of logger
	 */
	private CookieLogger cl = CookieLogger.getInstance();
	
	/**
	 * calls readSQLite for chrome and logs number of found cookies
	 * @param OS which operating system is found
	 */
	public Chrome(String OS) {
		cookies = readSQLite(OS, 1);
		
		cl.getLogger().log(Level.INFO, "Found " + cookies.size() + " Cookies");
	}

	/**
	 * returns a list of chrome cookies
	 * @return cookie list
	 */
	public ArrayList<Cookie> getCookies() {
		return cookies;
	}
}
